#ifndef BACKOFF_SPINLOCK_H
#define BACKOFF_SPINLOCK_H

#include "../atomic/atomic.h"

typedef struct {
    atomic_int locked;
} backoff_spinlock_t;

void backoff_spinlock_init(backoff_spinlock_t *lock);
void backoff_spinlock_lock(backoff_spinlock_t *lock);
void backoff_spinlock_unlock(backoff_spinlock_t *lock);

#endif // BACKOFF_SPINLOCK_H 